var express = require('express');
var router = express.Router();
const fs = require('fs');

router.post('/', function(req, res, next) {
  console.log(req.query)
  fs.writeFileSync(`../server/public/${req.query.filename}.html`,`${req.body.msg}`)
});

module.exports = router;
